<input type="hidden" id="Base_url" value="<?php echo $filters_data['base_url']; ?>">
<input type="hidden" id="Description_url" value="<?php echo $filters_data['description_url']; ?>">
<div id="columna_sx">
	<?php if ( isset($filters_data['selected_filters']) ) { ?>
		<div class="filtros_aplicados">
			<div id="filtro_box" class="">
				<font class="texto_filtro_box"><?php echo __('Active Filters') ?></font>
			</div>    
			<?php foreach($filters_data['selected_filters'] as $filter) { ?>
				<div class="box_texto_filtro_gris filtro_seleccionado">
					<a href="<?php echo $filter['url_on_remove']; ?>">
						<?php echo $this->Html->image('cancelar_filtro.png',  
						array('class' => 'boton_borrar','width' =>'16', 'height'=>'16')) ?>
					</a>
					<font class="texto_filtro_gris_left"><?php echo $filter['display_text_on_selected']; ?></font>		
					
				</div>
				
				<?php if($filter['filter_type'] == 'text') { ?>
				<div class="additional_filter">
					<input type="hidden" class="field_name" value="<?php echo $filter['field_denomination']; ?>">
					<input type="hidden" class="filter_type" value="<?php echo $filter['filter_type']; ?>">
					<input type="hidden" class="previous_value" value="<?php echo $filter['selected_value']; ?>">
				</div>
				<?php } ?>
				<?php if($filter['filter_type'] == 'range') { ?>
				<div class="additional_filter">
					<input type="hidden" class="field_name" value="<?php echo $filter['field_denomination']; ?>">
					<input type="hidden" class="filter_type" value="<?php echo $filter['filter_type']; ?>">
					<input type="hidden" class="previous_min_value" value="<?php echo $filter['selected_value']['min']; ?>">
					<input type="hidden" class="previous_max_value" value="<?php echo $filter['selected_value']['max']; ?>">
				</div>
				<?php } ?>
			<?php } ?>
			
			<a href="/propiedades/pais/<?php echo $pais; ?>/propiedades"><font class="texto_filtro_rojo"><?php echo __('Remove all filters')?></font></a>
		</div>
	<?php } ?>  

	<div id="filtro_box"><font class="texto_filtro_box"><?php echo __('Filter Results') ?> </font></div>

	<ul class="accordion">
		<?php foreach($filters_data['filters'] as $filter) { ?>
			<?php if( count($filter['items_list']) >= 1 ) { ?>
				<li class="box_texto_filtro_gris">
						<a>
							<?php echo $this->Html->image('cerrado.png', array (	
															'class'=>'boton_borrar', 'width'=>'16', 'height' =>'16'))
							?>
							<font class="texto_filtro_gris_bold"><?php echo $filter['title']; ?></font>
						</a>
						
						<ul>
							<?php if ($filter['filter_type'] == 'text') {  ?>
							<li class="additional_filter">
								<input type="text" class="grid_2 current_value" value="<?php if ($filter['selected_value'] != "") { echo $filter['selected_value']; } ?>" onfocus="eFocus(this)" />
								<input type="hidden" class="filter_type" value="<?php echo $filter['filter_type']; ?>">
								<input type="hidden" class="field_name" value="<?php echo $filter['field_denomination']; ?>">
								<input type="submit" value="Filtrar &gt;&gt;" class="bt-simple filter_button"/>
								<input type="hidden" class="previous_value" value="<?php echo $filter['selected_value']; ?>">
							</li>					
							<?php } ?>
							<?php if (	$filter['filter_type'] == 'items_list') { ?>
								<?php 
									$counter = 0; $show_more = false;
									foreach($filter['items_list'] as $filter_item) { ?>
										
										<li class="box_texto_filtro_buscar<?php if ($counter > 5) { echo ' ocultar'; $show_more = true; } ?>">
											<a  class="texto_filtro_naranja_buscar" href="<?php echo $filter_item['url']; ?>"><?php echo $filter_item['link_display_text']; ?></a> 
											<font class="texto_filtro_gris_buscar">
												&nbsp;(<?php echo $filter_item['quantity']; ?> <?php if($filter_item['quantity'] > 1) { echo $filters_data['product_name']['multiple'];  }else{ echo $filters_data['product_name']['single']; } ?>)
											</font>
										</li>
										
								<?php $counter++; } ?>
								<?php if ($show_more) { ?>
									<a style="cursor:pointer;" class="show_more">Mostrar todos</a>
									<a style="cursor:pointer; display:none;" class="show_less">Mostrar menos</a>
								<?php } ?>
							<?php } ?>
						
							<?php if (	$filter['filter_type'] == 'range') { ?>
								<div class="additional_filter range">
									<div class="grid_2 alpha">
										<label>&nbsp;&nbsp;Desde</label>
										<input type="text" class="grid_2 range current_min_value" value="<?php if ($filter['selected_min_value'] != "") { echo $filter['selected_min_value']; } ?>" onfocus="eFocus(this)" />
									</div>
									<div class="grid_2 alpha">
										<label>&nbsp;&nbsp;Hasta</label>
										<input type="text" class="grid_2 range current_max_value" value="<?php if ($filter['selected_max_value'] != "") { echo $filter['selected_max_value']; } ?>" onfocus="eFocus(this)" />
									</div>
									<input type="hidden" class="filter_type" value="<?php echo $filter['filter_type']; ?>">
									<input type="hidden" class="field_name" value="<?php echo $filter['field_denomination']; ?>">
									<input type="hidden" class="previous_min_value" value="<?php echo $filter['selected_value']['min']; ?>">
									<input type="hidden" class="previous_max_value" value="<?php echo $filter['selected_value']['max']; ?>">
									<input class="bt-simple filter_button" type="submit" value="Filtrar >>"></a>
								</div>	
							<?php } ?>
						</ul>
				</li>
			<?php } ?>
		<?php } ?>
	</ul>

</div>